﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Media.Imaging;

namespace Hi_Baidu.Plugin
{
    /// <summary>
    ///     窗体插件基类
    /// </summary>
    public abstract class WindowPlugin : Plugin, IWindowPlugin
    {
        protected VISIABLE visiable;
        /// <summary>
        ///     显示状态
        /// </summary>
        public VISIABLE Visiable
        {
            get { return visiable; }
        }

        protected Object toolTip;
        /// <summary>
        ///     插件所控制区域提示
        /// </summary>
        public Object ToolTip
        {
            get { return toolTip; }
        }

        protected Size pluginImageSize;
        /// <summary>
        ///     插件图标大小
        /// </summary>
        public Size PluginImageSize
        {
            get { return pluginImageSize; }
        }

        protected String pluginImagePath;
        /// <summary>
        ///     插件所呈现的图标路径
        /// </summary>
        public String PluginImagePath
        {
            get { return pluginImagePath; }
        }

        private FrameworkElement control;
        /// <summary>
        ///     插件所拥有的界面控制区域
        /// </summary>
        public FrameworkElement Control
        {
            get { return control; }
            set { control = value; }
        }

        private Window host;
        /// <summary>
        ///     插件所属宿主窗体
        /// </summary>
        public Window Host
        {
            get { return host; }
            set { host = value; }
        }

        /// <summary>
        ///     得到插件类别
        /// </summary>
        /// <returns>返回插件类别</returns>
        public override Plugin.PLUGIN_TYPE GetPluginType()
        {
            return PLUGIN_TYPE.WINDOW_PLUGIN;
        }

        #region IWindowPlugin 成员

        public abstract void AppendEvent();
        /// <summary>
        ///     显示状态
        /// </summary>
        public enum VISIABLE
        {
            Visiable,
            Hidden
        }
        #endregion
    }
}
